﻿<Page x:Name="page"
    x:Class="RichMan4LApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:RichMan4LApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Loaded="page_Loaded" Unloaded="page_Unloaded">
	<Page.Transitions>

	</Page.Transitions>
	<Page.Resources>
		<Storyboard x:Name="StartStoryBoard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="640" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainPageDownImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainPageUpImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MainGrid">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="LeaveStoryBoard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainPageDownImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainPageUpImage">
				<EasingDoubleKeyFrame KeyTime="0" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="640" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainGrid">
				<EasingDoubleKeyFrame KeyTime="0" Value="1" EasingFunction="{StaticResource EasingFunction}"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" EasingFunction="{StaticResource EasingFunction}"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Grid>
		<Rectangle x:Name="BackGroundRect">
			<Rectangle.Fill>
				<SolidColorBrush Color="#FF00AAAA"/>
			</Rectangle.Fill>
		</Rectangle>
		<Image x:Name="MainPageUpImage" Source="ms-appx:///PageResources/MainPageUp.png" d:LayoutOverrides="LeftMargin, RightMargin, TopMargin, BottomMargin, TopPosition, BottomPosition" Stretch="UniformToFill" VerticalAlignment="Top"/>
		<Image x:Name="MainPageDownImage" Source="ms-appx:///PageResources/MainPageDown.png" d:LayoutOverrides="LeftMargin, RightMargin" Stretch="UniformToFill" VerticalAlignment="Bottom"/>
		<Grid x:Name="MainGrid" RenderTransformOrigin="0.5,0.5">
			<Grid.RenderTransform>
				<CompositeTransform/>
			</Grid.RenderTransform>
			<Grid.ColumnDefinitions>
				<ColumnDefinition/>
				<ColumnDefinition Width="2*"/>
				<ColumnDefinition/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="15*"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="10*"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="5*"/>
				<RowDefinition Height="Auto" MinHeight="38"/>
				<RowDefinition Height="5*"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="20*"/>
			</Grid.RowDefinitions>
			<TextBlock x:Name="Title" TextWrapping="Wrap" Margin="0" FontFamily="{StaticResource Font}" FontSize="64" Grid.Row="1" VerticalAlignment="Center" Grid.ColumnSpan="3" HorizontalAlignment="Center">
				<Run Text="RichMan"/>
				<Run Text="4"/>
				<Run Text="L"/>
			</TextBlock>
			<Button x:Name="NewGameButton" Content="新游戏" VerticalAlignment="Stretch" Margin="0" HorizontalAlignment="Stretch" Grid.Row="3" MinWidth="0" MinHeight="0" d:LayoutOverrides="TopPosition, BottomPosition" FontFamily="{StaticResource Font}" FontSize="32" Template="{StaticResource ButtonControlTemplate}" Padding="{StaticResource ButtonPadding}" Background="{StaticResource TransparentCran}" BorderBrush="{x:Null}" Grid.Column="1" Foreground="White" Click="NewGameButton_Click"/>
			<Button x:Name="LoadGameButton" Content="加载存档" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Grid.Row="5" MinWidth="0" MinHeight="0" Grid.Column="1" Template="{StaticResource ButtonControlTemplate}" Padding="10,5,10,10" Background="{StaticResource TransparentCran}" BorderBrush="{x:Null}" FontFamily="{StaticResource Font}" FontSize="32"/>
			<Button x:Name="ListButton" Content="排行榜" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Grid.Row="7" MinWidth="0" MinHeight="0" Grid.Column="1" Template="{StaticResource ButtonControlTemplate}" Padding="10,5,10,10" Background="{StaticResource TransparentCran}" BorderBrush="{x:Null}" FontFamily="{StaticResource Font}" FontSize="32"/>
			<Button x:Name="SettingButton" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,40,40" Grid.Row="8" MinWidth="0" MinHeight="0" Grid.Column="2" Template="{StaticResource ButtonControlTemplate}" Padding="5" Background="{StaticResource TransparentCran}" BorderBrush="{x:Null}" FontFamily="{StaticResource Font}" FontSize="32" d:LayoutOverrides="LeftPosition, RightPosition, TopPosition, BottomPosition" Width="45" Height="45" Click="SettingButton_Click">
				<SymbolIcon Symbol="Setting" Margin="1,1,0,0" RenderTransformOrigin="0.5,0.5">
					<SymbolIcon.RenderTransform>
						<CompositeTransform ScaleX="1.25" ScaleY="1.25"/>
					</SymbolIcon.RenderTransform>
				</SymbolIcon>
			</Button>

		</Grid>
	</Grid>
</Page>